package com.leapp.sk.viewdelegate.adapter.find

import android.widget.ImageView
import android.widget.LinearLayout
import cc.vv.lkbasecomponent.util.LKScreenUtil
import com.example.mvp.delegate.BaseAdapterDelegate
import com.leapp.sk.R

/**
 * 试听课适配器
 * @author  chaohaipeng  on 2018/8/15.
 */
class AuditionsAdapterDelegate: BaseAdapterDelegate(){
    override fun getOptionsMenuId(): Int {
        return 0
    }

    override fun initWidget() {
    }

    override fun onDestroy() {
    }

    override fun initLayoutRes(): Int {
        return R.layout.adapter_auditions
    }

    /**
     * 设置数据
     */
    fun  setData(){
        val iv_aa_auditions_image = getView<ImageView>(R.id.iv_aa_auditions_image)
        val layoutParams: LinearLayout.LayoutParams = iv_aa_auditions_image.layoutParams as LinearLayout.LayoutParams
        layoutParams.width= LKScreenUtil.getScreenWidth()/2- LKScreenUtil.dp2px(30f)
        layoutParams.height= LKScreenUtil.getScreenWidth()/2- LKScreenUtil.dp2px(60f)
        iv_aa_auditions_image.layoutParams=layoutParams
    }

}